"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const maishu_chitu_admin_1 = require("maishu-chitu-admin");
const website_config_1 = require("./website-config");
const maishu_node_auth_1 = require("maishu-node-auth");
const data_context_1 = require("./data-context");
async function start(settings) {
    await maishu_node_auth_1.createDatabaseIfNotExists(settings.db, initDatabase);
    await data_context_1.createDataContext(settings.db);
    maishu_chitu_admin_1.start({
        port: settings.port,
        rootDirectory: __dirname,
        station: {
            gateway: `${settings.gateway}`,
            path: website_config_1.stationPath,
            permissions: website_config_1.permissions,
        },
        serverContextData: { db: settings.db }
    });
}
exports.start = start;
async function initDatabase(connConfig) {
}
exports.initDatabase = initDatabase;
